package cn.globalph.housekeeper.utils

import android.content.Context
import android.os.Build
import android.os.PowerManager
import androidx.annotation.RequiresApi

object  WhiteListUtil{
    @RequiresApi(Build.VERSION_CODES.M)
    fun isSystemWhiteList(context: Context):Boolean{
        var pm = context.getSystemService(Context.POWER_SERVICE) as PowerManager
        var packageName = context.packageName
        var isWhite = pm.isIgnoringBatteryOptimizations(packageName);
        return isWhite
    }
}